home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGBLER / WHIZZARD.LZH / SCRLUP.ASM < prev    next >
Assembly Source File  |  1983-06-27  |  2KB  |  94 lines

  1. COMMENT *
  2.  
  3.                  CLUBware  (tm)
  4.  
  5.       SCRLUP scrolls up a window on the screen.
  6.  
  7.            Copyright 1984 Rayhawk Automation N.W. Inc
  8.                   P.O. Box 1427
  9.                   Beaverton, Oregon   97075
  10.  
  11.       Algorithm:
  12.           Simply pass parameters to BIOS video AH = 6
  13.  
  14.       CALL      SCRLUP ( STARTY% , STARTX% , ENDY% , ENDX% , COUNT% )
  15.  
  16.           ( STARTX% , STARTY% ) upper left corner of window
  17.  
  18.           ( ENDX% , ENDY% ) lower right corner of window
  19.  
  20.           1,1 is upper left corner
  21.  
  22.           COUNT%  count of lines to scroll up
  23.               = 0 means blank the entire window
  24.  
  25.                                           *
  26.  
  27. ;______________________________________________________________________________
  28.  
  29. ;  Normal assembly directives
  30.  
  31. CODE      SEGMENT PARA PUBLIC 'CODE'
  32.  
  33.       ASSUME  CS:CODE
  34.  
  35.       PUBLIC  SCRLUP
  36.  
  37. ;______________________________________________________________________________
  38.  
  39. SCRLUP      PROC      FAR
  40.  
  41.       PUSH      BP
  42.       MOV      BP,SP
  43.       PUSH      AX               ; save all registers used,
  44.       PUSH      BX               ;  no data segment local to this
  45.       PUSH      CX               ;  routine so segment registers
  46.       PUSH      DX               ;  are untouched.
  47.  
  48.  
  49. ;      ...      1) load the input parameters into registers
  50.  
  51.       MOV      BX,WORD PTR [BP+6]   ; address of COUNT%
  52.       MOV      AL,BYTE PTR [BX]     ; load count itself
  53.  
  54.       MOV      BX,WORD PTR [BP+8]   ; address of ENDX%
  55.       MOV      DL,BYTE PTR [BX]
  56.       DEC      DL
  57.  
  58.       MOV      BX,WORD PTR [BP+10]  ; address of ENDY%
  59.       MOV      DH,BYTE PTR [BX]
  60.       DEC      DH
  61.  
  62.       MOV      BX,WORD PTR [BP+12]  ; address of STARTX%
  63.       MOV      CL,BYTE PTR [BX]
  64.       DEC      CL
  65.  
  66.       MOV      BX,WORD PTR [BP+14]  ; address of STARTY%
  67.       MOV      CH,BYTE PTR [BX]
  68.       DEC      CH
  69.  
  70.       MOV      BH,07h           ; use normal video attribute
  71.  
  72.  
  73. ;      ...      2) have BIOS scroll the window up
  74.  
  75.       MOV      AH,6
  76.       INT      10h
  77.  
  78.  
  79.       POP      DX
  80.       POP      CX
  81.       POP      BX
  82.       POP      AX
  83.       POP      BP
  84.       RET      10
  85.  
  86.  
  87. SCRLUP      ENDP
  88.  
  89. ;______________________________________________________________________________
  90.  
  91. CODE      ENDS
  92.  
  93.       END
  94.